/*
 * @Author: Aster lipian1004@163.com
 * @Date: 2023-10-19 16:04:35
 * @FilePath: \aster-flowable-vue\src\mock\menu.ts
 * @Description: 菜单mock
 * Copyright (c) 2024 by Aster, All Rights Reserved.
 */

import { PORT1 } from '@/api/config';
import { MockMethod } from 'vite-plugin-mock';

const menuAuth = {
  url: PORT1 + `/menu/auth`,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: [
        {
          id: '1',
          pid: '0',
          name: '首页',
          enName: 'Home',
          icon: 'iconfont icon-SmartHome',
          path: '/home',
          component: '/home',
          type: '1',
          children: [],
          isHide: '1',
          isKeepAlive: '0',
          isAffix: '0',
          isFull: '1',
          status: '0',
          orderNum: 0,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '2',
          pid: '0',
          name: '系统设置',
          enName: 'Setting',
          icon: 'iconfont icon-shezhi',
          path: '/setting',
          component: '',
          type: '0',
          children: [
            {
              id: '21',
              pid: '2',
              name: '菜单管理',
              enName: 'Menu',
              icon: 'iconfont icon-caidan',
              path: '/system/menu',
              component: '/system/menu/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '22',
              pid: '2',
              name: '数据字典',
              enName: 'Dict',
              icon: 'iconfont icon-zidianguanli',
              path: '/system/dict',
              component: '/system/dict/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '23',
              pid: '2',
              name: '附件管理',
              enName: 'File',
              icon: 'iconfont icon-fujian',
              path: '/system/file',
              component: '/system/file/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '24',
              pid: '2',
              name: '定时任务',
              enName: 'Quartz',
              icon: 'iconfont icon-renwu',
              path: '/system/quartz',
              component: '/system/quartz/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 1,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '3',
          pid: '0',
          name: '权限管理',
          enName: 'Auth',
          icon: 'iconfont icon-shenqingquanxian',
          path: '/auth',
          component: '',
          type: '0',
          children: [
            {
              id: '31',
              pid: '3',
              name: '用户管理',
              enName: 'User',
              icon: 'iconfont icon-geren',
              path: '/auth/user',
              component: '/auth/user/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '32',
              pid: '3',
              name: '角色管理',
              enName: 'Role',
              icon: 'iconfont icon-jiaoseguanli',
              path: '/auth/role',
              component: '/auth/role/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '33',
              pid: '3',
              name: '部门管理',
              enName: 'Dept',
              icon: 'iconfont icon-bumen',
              path: '/auth/dept',
              component: '/auth/dept/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '34',
              pid: '3',
              name: '岗位管理',
              enName: 'Post',
              icon: 'iconfont icon-gangweishouquan',
              path: '/auth/post',
              component: '/auth/post/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 2,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '4',
          pid: '0',
          name: '日志管理',
          enName: 'Log',
          icon: 'iconfont icon-rizhi',
          path: '/log',
          component: '',
          type: '0',
          children: [
            {
              id: '41',
              pid: '4',
              name: '访问日志',
              enName: 'Access',
              icon: 'iconfont icon-anquanfangwen',
              path: '/log/access',
              component: '/log/access/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '42',
              pid: '4',
              name: '操作日志',
              enName: 'Operation',
              icon: 'iconfont icon-caozuo',
              path: '/log/operation',
              component: '/log/operation/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 3,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '5',
          pid: '0',
          name: '常用组件',
          enName: 'Assembly',
          icon: 'iconfont icon-zujian',
          path: '/assembly',
          component: '',
          type: '0',
          children: [
            {
              id: '51',
              pid: '5',
              name: '引导页',
              enName: 'Guide',
              icon: 'iconfont icon-yonghuyindao',
              path: '/assembly/guide',
              component: '/assembly/guide/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '52',
              pid: '5',
              name: '图标选择器',
              enName: 'IconSelect',
              icon: 'iconfont icon-gengduo',
              path: '/assembly/icon-select',
              component: '/assembly/icon-select/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '53',
              pid: '5',
              name: '树形筛选器',
              enName: 'TreeFilter',
              icon: 'iconfont icon-zhiwu',
              path: '/assembly/tree-filter',
              component: '/assembly/tree-filter/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '54',
              pid: '5',
              name: '富文本编辑器',
              enName: 'WangEditor',
              icon: 'iconfont icon-bianji',
              path: '/assembly/editor',
              component: '/assembly/editor/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '55',
              pid: '5',
              name: '页面打印',
              enName: 'Print',
              icon: 'iconfont icon-dayinji',
              path: '/assembly/print',
              component: '/assembly/print/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 4,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '56',
              pid: '5',
              name: '自定义指令',
              enName: 'Directives',
              icon: 'iconfont icon-anniu',
              path: '/assembly/directives',
              component: '/assembly/directives/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 5,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 3,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '99',
          pid: '0',
          name: '计划管理',
          enName: 'Plan',
          icon: 'iconfont icon-zhouqi',
          path: '/plan',
          component: '',
          type: '0',
          children: [
            {
              id: '991',
              pid: '99',
              name: '日计划',
              enName: 'Today',
              icon: 'iconfont icon-tiancheng',
              path: '/plan/today',
              component: '/plan/today',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '992',
              pid: '99',
              name: '周计划',
              enName: 'Week',
              icon: 'iconfont icon-zhouqi',
              path: '/plan/week',
              component: '/plan/week',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '993',
              pid: '99',
              name: '月计划',
              enName: 'Month',
              icon: 'iconfont icon-yueliang',
              path: '/plan/month',
              component: '/plan/month',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '994',
              pid: '99',
              name: '年计划',
              enName: 'Year',
              icon: 'iconfont icon-niannianyouyu',
              path: '/plan/year',
              component: '/plan/year',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '0',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '0',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 99,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
      ],
      message: 'success',
    };
  },
};

const menuList = {
  url: PORT1 + '/menu/list',
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: [
        {
          id: '1',
          pid: '0',
          name: '首页',
          enName: 'Home',
          icon: 'iconfont icon-SmartHome',
          path: '/home',
          component: '/home',
          type: '1',
          children: [],
          isHide: '1',
          isKeepAlive: '0',
          isAffix: '0',
          isFull: '1',
          status: '0',
          orderNum: 0,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '2',
          pid: '0',
          name: '系统设置',
          enName: 'Setting',
          icon: 'iconfont icon-shezhi',
          path: '/setting',
          component: '',
          type: '0',
          children: [
            {
              id: '21',
              pid: '2',
              name: '菜单管理',
              enName: 'Menu',
              icon: 'iconfont icon-caidan',
              path: '/system/menu',
              component: '/system/menu/index',
              type: '1',
              children: [
                {
                  id: '211',
                  name: '查看',
                  enName: 'View',
                  icon: '',
                  path: '',
                  component: '',
                  type: '2',
                  children: [],
                  isHide: '1',
                  isKeepAlive: '1',
                  isAffix: '1',
                  isFull: '1',
                  status: '0',
                  orderNum: 0,
                  perms: 'sys:menu:list',
                  createTime: '2023-10-01 12:00:00',
                },
                {
                  id: '212',
                  name: '新增',
                  enName: 'Add',
                  icon: '',
                  path: '',
                  component: '',
                  type: '2',
                  children: [],
                  isHide: '1',
                  isKeepAlive: '1',
                  isAffix: '1',
                  isFull: '1',
                  status: '0',
                  orderNum: 0,
                  perms: 'sys:menu:add',
                  createTime: '2023-10-01 12:00:00',
                },
                {
                  id: '213',
                  name: '编辑',
                  enName: 'Edit',
                  icon: '',
                  path: '',
                  component: '',
                  type: '2',
                  children: [],
                  isHide: '1',
                  isKeepAlive: '1',
                  isAffix: '1',
                  isFull: '1',
                  status: '0',
                  orderNum: 0,
                  perms: 'sys:menu:edit',
                  createTime: '2023-10-01 12:00:00',
                },
                {
                  id: '214',
                  name: '删除',
                  enName: 'Delete',
                  icon: '',
                  path: '',
                  component: '',
                  type: '2',
                  children: [],
                  isHide: '1',
                  isKeepAlive: '1',
                  isAffix: '1',
                  isFull: '1',
                  status: '0',
                  orderNum: 0,
                  perms: 'sys:menu:delete',
                  createTime: '2023-10-01 12:00:00',
                },
              ],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '22',
              pid: '2',
              name: '数据字典',
              enName: 'Dict',
              icon: 'iconfont icon-zidianguanli',
              path: '/system/dict',
              component: '/system/dict/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '23',
              pid: '2',
              name: '附件管理',
              enName: 'File',
              icon: 'iconfont icon-fujian',
              path: '/system/file',
              component: '/system/file/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '24',
              pid: '2',
              name: '定时任务',
              enName: 'Quartz',
              icon: 'iconfont icon-renwu',
              path: '/system/quartz',
              component: '/system/quartz/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 4,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 1,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '3',
          pid: '0',
          name: '权限管理',
          enName: 'Auth',
          icon: 'iconfont icon-shenqingquanxian',
          path: '/auth',
          component: '',
          type: '0',
          children: [
            {
              id: '31',
              pid: '3',
              name: '用户管理',
              enName: 'User',
              icon: 'iconfont icon-geren',
              path: '/auth/user',
              component: '/auth/user/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '32',
              pid: '3',
              name: '角色管理',
              enName: 'Role',
              icon: 'iconfont icon-jiaoseguanli',
              path: '/auth/role',
              component: '/auth/role/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '33',
              pid: '3',
              name: '部门管理',
              enName: 'Dept',
              icon: 'iconfont icon-bumen',
              path: '/auth/dept',
              component: '/auth/dept/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '34',
              pid: '3',
              name: '岗位管理',
              enName: 'Post',
              icon: 'iconfont icon-gangweishouquan',
              path: '/auth/post',
              component: '/auth/post/index',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 2,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '4',
          pid: '0',
          name: '日志管理',
          enName: 'Log',
          icon: 'iconfont icon-shezhi',
          path: '/log',
          component: '',
          type: '0',
          children: [
            {
              id: '41',
              pid: '4',
              name: '访问日志',
              enName: 'Access',
              icon: 'iconfont icon-anquanfangwen',
              path: '/log/access',
              component: '/log/access',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '42',
              pid: '4',
              name: '操作日志',
              enName: 'Operation',
              icon: 'iconfont icon-caozuo',
              path: '/log/operation',
              component: '/log/operation',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '1',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 3,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
        {
          id: '5',
          pid: '0',
          name: '计划管理',
          enName: 'Plan',
          icon: 'iconfont icon-shezhi',
          path: '/plan',
          component: '',
          type: '0',
          children: [
            {
              id: '51',
              pid: '5',
              name: '日计划',
              enName: 'Today',
              icon: 'iconfont icon-tiancheng',
              path: '/plan/today',
              component: '/plan/today',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 0,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '52',
              pid: '5',
              name: '周计划',
              enName: 'Week',
              icon: 'iconfont icon-zhouqi',
              path: '/plan/week',
              component: '/plan/week',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 1,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '53',
              pid: '5',
              name: '月计划',
              enName: 'Month',
              icon: 'iconfont icon-yueliang',
              path: '/plan/month',
              component: '/plan/month',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '1',
              status: '0',
              orderNum: 2,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
            {
              id: '54',
              pid: '5',
              name: '年计划',
              enName: 'Year',
              icon: 'iconfont icon-niannianyouyu',
              path: '/plan/year',
              component: '/plan/year',
              type: '1',
              children: [],
              isHide: '1',
              isKeepAlive: '1',
              isAffix: '1',
              isFull: '0',
              status: '0',
              orderNum: 3,
              perms: '',
              createTime: '2023-10-01 12:00:00',
            },
          ],
          isHide: '1',
          isKeepAlive: '0',
          isAffix: '1',
          isFull: '1',
          status: '0',
          orderNum: 99,
          perms: '',
          createTime: '2023-10-01 12:00:00',
        },
      ],
      message: 'success',
    };
  },
};

const buttonList = {
  url: PORT1 + `/menu/buttons`,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: [
        'sys:menu:info',
        'sys:menu:add',
        'sys:menu:edit',
        'sys:menu:delete',

        'sys:dict:all',
        'sys:dict:info',
        'sys:dict:add',
        'sys:dict:edit',
        'sys:dict:delete',

        'sys:user:info',
        'sys:user:add',
        'sys:user:edit',
        'sys:user:delete',
        'sys:user:reset',
        'sys:user:import',
        'sys:user:export',

        'sys:role:info',
        'sys:role:add',
        'sys:role:edit',
        'sys:role:delete',
        'sys:role:list',
        'sys:role:menu',

        'sys:dept:info',
        'sys:dept:add',
        'sys:dept:edit',
        'sys:dept:delete',

        'sys:post:info',
        'sys:post:add',
        'sys:post:edit',
        'sys:post:delete',

        'sys:access:export',
        'sys:operation:export',
        'sys:operation:detail',
      ],
      message: 'success',
    };
  },
};

const save = {
  url: PORT1 + `/menu/save`,
  method: 'post',
  response: () => {
    return {
      code: 200,
      data: 'success',
      message: 'success',
    };
  },
};

const menuInfo = {
  url: PORT1 + `/menu/info/21`,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: {
        id: '21',
        pid: '2',
        name: '菜单管理',
        enName: 'Menu',
        icon: 'iconfont icon-caidan',
        path: '/system/menu',
        component: '/system/menu/index',
        type: '1',
        children: [],
        isHide: '1',
        isKeepAlive: '1',
        isAffix: '1',
        isFull: '1',
        status: '0',
        orderNum: 1,
        perms: '',
        createTime: '2023-10-01 12:00:00',
      },
      message: 'success',
    };
  },
};

const menuDelete = {
  url: PORT1 + `/menu/delete/21`,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: 'success',
      message: 'success',
    };
  },
};

export default [menuAuth, menuList, buttonList, save, menuInfo, menuDelete] as MockMethod[];
